<script language="JavaScript">
    var URL = '__URL__';
    var APP  = '__APP__';
    var SELF='__SELF__';
    var PUBLIC='__PUBLIC__';
    $(function(){
        $("input:radio[name='URL_MODEL']").click(function(){
            if ( $(this).attr('checked')) {
                var val = $(this).val();
                if (val == 1 || val ==2 ) {
                    $('#UrlRouter1').show();
                    $('#UrlRouter2').show();
                }else {
                    $('#UrlRouter1').hide();
                    $('#UrlRouter2').hide();
                }
            }
        });
    });
</script>
<div class="bjui-pageHeader">
    <div class="glyphicon glyphicon-th-large">伪静态设置</div>
</div>
<div class="bjui-pageContent">
    <div class="form">
        <form method='post' data-toggle="validate" action="{:U('System/url')}">
            <table class="table table-bordered table-hover table-striped table-top">
                <tr>
                    <td colspan="2">本页设置主要针对URL和服务器进行优化，如不懂，请不要擅自操作，默认已经配置对SEO友好了的</td>
                </tr>
                <tr>
                    <td colspan="2">伪静态</td>
                </tr>
                <tr>
                    <td>URL模式：</td>
                    <td>
                        <input type="radio" name="URL_MODEL" value="0" <if condition="C('URL_MODEL__INDEX') eq 0">checked="checked"</if>>普通模式
                        <div>URL参数模式：http://www.0771mc.com/index.php?m=List&a=index&id=1</div>
                        <input type="radio" name="URL_MODEL" value="1" <if condition="C('URL_MODEL__INDEX') eq 1">checked="checked"</if>>PATHINFO模式
                        <div>PATHINFO模式：http://www.0771mc.com/index.php/List/index/id/1</div>
                        <input type="radio" name="URL_MODEL" value="2" <if condition="C('URL_MODEL__INDEX') eq 2">checked="checked"</if>>REWRITE模式(需要URL_REWRITE支持)
                        <div>
                            REWRITE模式和PATHINFO模式功能一样,需开启URL_REWRITE模块(隐藏index.php),如：
                            <br/>
                            http://www.0771mc.com/List/index/id/1/
                        </div>
                        <input type="radio" name="URL_MODEL" value="3" <if condition="C('URL_MODEL__INDEX') eq 3">checked="checked"</if>>兼容模式
                        <div>兼容模式：http://www.0771mc.com/index.php?s=/List/index/id/1</div>
                    </td>
                </tr>
                <tr>
                    <td>参数分割符：</td>
                    <td>
                        <input type="text" name="URL_PATHINFO_DEPR" value="{:C('URL_PATHINFO_DEPR')}" class="inp_small" />
                        <div>
                            针对PATHINFO模式,默认为"/",如改为"-"：http://www.0771mc.com/index.php/List-index-id-1
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">开启URL路由(路由规则不熟悉的不要乱改)</td>
                </tr>
                <tr id="UrlRouter1" <if condition="C('URL_MODEL__INDEX') neq 1 && C('URL_MODEL__INDEX') neq 2">style="display:none;"</if>>
                    <td>开启路由：</td>
                    <td>
                        <input type="checkbox" name="URL_ROUTER_ON" value="1" <if condition="C('URL_ROUTER_ON__INDEX') eq 1">checked="checked"</if> />开启
                    </td>
                </tr>
                <tr id="UrlRouter2" <if condition="C('URL_MODEL__INDEX') neq 1 && C('URL_MODEL__INDEX') neq 2">style="display:none;"</if> >
                    <td>路由规则：</td>
                    <td>
                    <textarea name="URL_ROUTE_RULES" class="tarea_default" cols="30" rows="5">{$url_route_rules}</textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">静态缓存(缓解服务器压力)</td>
                </tr>
                <tr>
                    <td>开启静态缓存：</td>
                    <td>
                    <input type="checkbox" name="HTML_CACHE_ON__INDEX" value="1" <if condition="C('HTML_CACHE_ON__INDEX') eq 1">checked="checked"</if> />开启电脑版缓存
                    <input type="checkbox" name="HTML_CACHE_ON__NOBILE" value="1" <if condition="C('HTML_CACHE_ON__NOBILE') eq 1">checked="checked"</if> />开启手机版缓存
                    </td>
                </tr>
                <tr>
                    <td>缓存规则：</td>
                    <td>
                        <div>缓存时间(秒)：0为永久缓存</div>
                        <div>
                        <input type="checkbox" name="html_cache_index_on" value="1" <if condition="$html_cache_index_on eq 1">checked="checked"</if> />首页缓存 缓存时间：
                        <input type="text" name="html_cache_index_time" class="inp_small" value="{$html_cache_index_time}" /> 秒
                        </div>
                        <div><input type="checkbox" name="html_cache_list_on" value="1" <if condition="$html_cache_list_on eq 1">checked="checked"</if> />栏目缓存 缓存时间：
                        <input type="text" name="html_cache_list_time" class="inp_small" value="{$html_cache_list_time}" />秒
                        </div>
                        <div>
                        <input type="checkbox" name="html_cache_show_on" value="1" <if condition="$html_cache_show_on eq 1">checked="checked"</if> />文章缓存 缓存时间：
                        <input type="text" name="html_cache_show_time" class="inp_small" value="{$html_cache_show_time}" /> 秒
                        </div>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">关闭</button>
        </li>
        <li>
            <button data-icon="save" class="btn btn-default" type="submit">保存</button>
        </li>
    </ul>
</div>